package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ResPackageMapper;
import com.ruoyi.system.domain.ResPackage;
import com.ruoyi.system.service.IResPackageService;

/**
 * 餐馆套餐Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-29
 */
@Service
public class ResPackageServiceImpl implements IResPackageService 
{
    @Autowired
    private ResPackageMapper resPackageMapper;

    /**
     * 查询餐馆套餐
     * 
     * @param packageId 餐馆套餐主键
     * @return 餐馆套餐
     */
    @Override
    public ResPackage selectResPackageByPackageId(Long packageId)
    {
        return resPackageMapper.selectResPackageByPackageId(packageId);
    }

    /**
     * 查询餐馆套餐列表
     * 
     * @param resPackage 餐馆套餐
     * @return 餐馆套餐
     */
    @Override
    public List<ResPackage> selectResPackageList(ResPackage resPackage)
    {
        return resPackageMapper.selectResPackageList(resPackage);
    }

    @Override
    public List<ResPackage> selectResPackageListByUserId(ResPackage resPackage, Long userId) {
        return resPackageMapper.selectResPackageListByUserId(resPackage, userId);
    }

    /**
     * 新增餐馆套餐
     * 
     * @param resPackage 餐馆套餐
     * @return 结果
     */
    @Override
    public int insertResPackage(ResPackage resPackage)
    {
        return resPackageMapper.insertResPackage(resPackage);
    }

    /**
     * 修改餐馆套餐
     * 
     * @param resPackage 餐馆套餐
     * @return 结果
     */
    @Override
    public int updateResPackage(ResPackage resPackage)
    {
        return resPackageMapper.updateResPackage(resPackage);
    }

    /**
     * 批量删除餐馆套餐
     * 
     * @param packageIds 需要删除的餐馆套餐主键
     * @return 结果
     */
    @Override
    public int deleteResPackageByPackageIds(Long[] packageIds)
    {
        return resPackageMapper.deleteResPackageByPackageIds(packageIds);
    }

    /**
     * 删除餐馆套餐信息
     * 
     * @param packageId 餐馆套餐主键
     * @return 结果
     */
    @Override
    public int deleteResPackageByPackageId(Long packageId)
    {
        return resPackageMapper.deleteResPackageByPackageId(packageId);
    }
}
